<script type="text/javascript">
	var pinID = '<%= params[:id]%>'
    jQuery(document).ready(function(){
        EditPin.setup();
    });
</script>
<div class="ModalContainer" id="DeletePin" style="display: none;">
    <div class="modal thin">
        <p style="font-size: 18px; font-weight: bold;">删除采集后不能恢复,确定要删除吗?</p>
        <div style="text-align: right;">
            <button type="button" onclick="Modal.close('DeletePin');" class="Button WhiteButton Button18">取消</button>&nbsp;&nbsp;&nbsp;
            <button type="button" onclick="EditPin.deletePin();" data-text-deleting="删除…" class="SubmitButton Button RedButton Button18">删除采集</button>
        </div>
    </div>
    <!-- .modal -->
    <div class="overlay"></div>
</div>
<div class="FixedContainer">
    <div id="PinEditPreview" class="pin">
        <div class="price">
        </div>
        <a href="/pin/item/<%= @pin.id%>"><img src="<%= @pin.media%>" style="height: 126px"></a>
        <p id="PostDescription"><%= @pin.description%></p>
    </div>
    <% form_tag "", :id => "PinEdit", :class => "Form StaticForm" do -%>
    <div class="ButtonHeading">
        <button id="delete" class="Button WhiteButton Button18 deleteButton" type="button" onclick="Modal.show('DeletePin');">删除采集</button>
        <h3>编辑采集</h3>
    </div>
    <ul>
        <li>
            <label>描述</label>
            <div class="Right">
                <div id="ta_holder" class="editable_shadow pin_edit">
					<%= text_area :pin, :description, :id => "description_pin_edit", :class => "expand autocomplete_desc", :cols => "40", :rows => "2", :maxlength => "500"%>
                </div>
            </div>
        </li>
        <li>
            <label for="id_link">来自</label>
            <div class="Right">
                <%= text_field :pin, :url%>
            </div>
        </li>
        <li>
        	<label for="id_board">画板</label>
			<div class="Right">
				<%= select :pin, :board_id, @user.boards_for_select%>
			</div>
        </li>
		<div class="Submit">
			<p><button class="Button RedButton Button24" type="submit">保存采集</button></p>
		</div>
    </ul>
    <% end -%>
</div>
